﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CrystalDecisions.Enterprise;
using BO.Management.QueryBuilder;

namespace BO.Management
{
    public class RecuringInstanceProvider:InstanceProvider
    {
        /// <summary>
        /// Default constructor required the LogonProvider used to connect to BO Cms
        /// </summary>
        /// <param name="logonProvider"></param>
        public RecuringInstanceProvider(LogonProvider logonProvider)
            : base(logonProvider)
        {
           
        }

        public override void AddSpecificFilter()
        {
            this.AddFilterToInstance(true);
            this.AddFilterToReccuringInstance();

        }

        public void AddFilterToReccuringInstance()
        {
            this.QueryBuilder.AddParameter<Int32>(InfoStoreFieldNames.Reccuring , OperatorType.Equal, 1);
        }


        public override ObjectKind Kind
        {
            get { return ObjectKind.RecuringInstance; }
        }
    }
}
